//
//  ContentView.swift
//  ReportScan
//
//  Created by woniu on 2025/5/7.
//

import SwiftUI

struct ContentView: View {
    @State private var isShowingSheet = false
    var body: some View {
        NavigationView {
            List {
                NavigationLink(destination: ScanImagePage()) {
                    Text("批量识别报告中的错误，标注、导出Excel")
                }
                NavigationLink(destination: ModifyReportPage()) {
                    Text("批量修改报告图片中的信息")
                }
                NavigationLink(destination: ModifyNameAgeSexPage()) {
                    Text("批量修改报告图片中的姓名、性别、年龄")
                }
                NavigationLink(destination: OcrPage()) {
                    Text("ocr识别图片中的信息")
                }
                NavigationLink(destination: ExportExcelPage()) {
                    Text("导出Excel")
                }
                NavigationLink(destination: ReadExcelPage()) {
                    Text("读取Excel")
                }
                NavigationLink(destination: ExportUserExcelPage()) {
                    Text("网络接口获取档案，导出Excel")
                }
                Button(role: .none) {
                    test()
                } label: {
                    Text("测试")
                }
                Button(action: {
                    isShowingSheet.toggle()
                }) {
                    Text("Show License Agreement")
                }
                .sheet(isPresented: $isShowingSheet,
                       onDismiss: {
                    
                }) {
                    VStack {
                        Text("License Agreement")
                            .font(.title)
                            .padding(50)
                        Text("""
                                        Terms and conditions go here.
                                    """)
                        .padding(50)
                        Button("Dismiss",
                               action: { isShowingSheet.toggle() })
                    }
                }
            }.navigationTitle("主页面")
        }
        
        
    }
    private func test(){
        let data = AppUtil.getCSVFile(isDropFirst: false,fileUrl: nil)
        print(data)
    }
}

#Preview {
    ContentView()
}
